/*--------------------------------------------------------------------------------------*\
**
** adv_tree_of_knowledge.h
**
** Heroes IV
** Copyright 2000, The 3DO Company
**
\*--------------------------------------------------------------------------------------*/

#ifndef ADV_TREE_OF_KNOWLEDGE_H_INCLUDED
#define ADV_TREE_OF_KNOWLEDGE_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "bool_array.h"
#include "single_use_object.h"

enum
{
    k_cost_2500_gold = 0,
    k_cost_5_gems = 1,
    k_cost_types = 2
};

enum 
{ 
    k_cost_gold = 2500,
    k_cost_gems = 5
};

class t_adv_tree_of_knowledge : public t_single_use_object
{

public:
	t_adv_tree_of_knowledge (  std::string const& source );
    void activate_trigger( t_army* army, t_adv_map_point const& point, 
		                               t_direction direction, t_adventure_frame* frame );
	virtual void	    initialize( t_adventure_map& map );
	virtual int         get_version() const;
	virtual bool        read( std::streambuf&						stream, 
					          t_qualified_adv_object_type const&	type,
					          int									version );
	virtual bool        write( std::streambuf& stream ) const;

protected:

    int     m_cost_type;
	t_bool_array m_visited;

    virtual void        set_cost_type();
    virtual void        select_heroes_dialog( std::vector<t_hero*> const& heroes, t_level_map_point_2d point,
										    t_window* parent, t_army* army );
	virtual void visit( t_hero* hero ); 
};

#endif // ADV_TREE_OF_KNOWLEDGE_H_INCLUDED

